#ifndef WATER_MARK_CLASS
#define WATER_MARK_CLASS 

#include <string>
#include <iostream>
#include <highgui.h>
#include <cv.h>
#include <imgcodecs.hpp>
#include <imgproc.hpp>
#include <unordered_map>
#include <time.h>
#include "AdContent.h"

using namespace cv;
using namespace std;

class WaterMark{
private:
	
	Mat embededImg;//user input image, 
	
	Mat originalImg;//original image for embededImg

	Mat originalDctImg; //pre-computed,save time

	Mat waterMark;//waterMark from embededImg

	Mat myQRImage;//newWaterMark 

	long long userId;// userId, input information
	
	long long fatherId; // father's Id

	long long adId; //ad Id

	ActivityContent * pAdData; //point to ad database, content can not be changed

protected:
	//get original image from search database or decode obvious info from embededImg
	bool getOriginalImg();
	//get water mark from embededImg using originalImg
	bool getWaterMarkFromEmbededImg();
	//decode water mark
	bool decodeWaterMark();
	//generate new water mark;
	bool generateNewWaterMark();
	//return a new embededImg
	bool embedNewWaterMark();

	
public:
	bool process();
	Mat newEmbededImg;
	WaterMark(Mat& inputImg, ActivityContent& adDataBase){
		embededImg = inputImg;
		pAdData =& adDataBase;
	}
	
	
	

};





#endif